import BaseComponent from "../Base/BaseComponent";
import './syle/index.less';
import Icon from "../Base/Icon/Icon";
import cx from 'classnames';

export default class LeftNavBar extends BaseComponent {

  render() {
    const {onCollapseLeftSide, hideSideBar} = this.props;

    const classnames = cx('left-navbar', {'open': !hideSideBar});
    return (
      <div className={classnames}>
        {!hideSideBar && <b className='log'>Mlnx</b>}
        <span className='toggle_sidemenu' onClick={onCollapseLeftSide}>
          <Icon antd type={hideSideBar ? 'menu-unfold' : 'menu-fold'}/>
        </span>
      </div>
    );
  }
}
